﻿package view.popup
{
    import com.core.*;
    import com.sh.game.global.*;
    import flash.events.*;
    import uiresource.bag.*;

    public class QhcgtipsCtrl extends QhTips1UI implements IDialogUI
    {

        public function QhcgtipsCtrl()
        {
            return;
        }// end function

        override protected function initialize() : void
        {
            super.initialize();
            closebtn.addEventListener(MouseEvent.CLICK, this.onclose);
            quedingBtn.addEventListener(MouseEvent.CLICK, this.onclose);
            return;
        }// end function

        protected function onclose(event:MouseEvent) : void
        {
            this.close();
            return;
        }// end function

        public function show(param1:Object) : void
        {
            this.visible = true;
            item.data = param1;
            x = (GlobalLayer.instance.root.stageWidth - width) / 2;
            y = (GlobalLayer.instance.root.stageHeight - height) / 2;
            return;
        }// end function

        public function close() : void
        {
            this.visible = false;
            item.data = null;
            ModelProxy.change("qhtips", "data", null);
            return;
        }// end function

    }
}
